package com.mayjean.redis.limit;

import java.util.concurrent.TimeUnit;

/**
 * @author
 */
public interface IRedisLimit {

	/**
	 * limit logic
	 *
	 * @param key      key
	 * @param max      max number
	 * @param ttl      window
	 * @param timeUnit window time unit
	 * @return
	 */
	Long limit(String key, long max, long ttl, TimeUnit timeUnit);

}
